home *** CD-ROM | disk | FTP | other *** search
/ Pro-Cent Games: For Only 1 Cent! / Pro Cent Games.bin / BrainTest.exe / scripts / DefineButton2_59 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2004-03-16  |  644 b   |  33 lines

  1. on(press){
  2.    tellTarget("_root.6")
  3.    {
  4.       gotoAndPlay(1);
  5.    }
  6.    i = _root.index;
  7.    set("_root.userArray[" + i + "]",6);
  8.    if(eval("_root.userArray[" + i + "]") eq eval("_root.computerArray[" + i + "]"))
  9.    {
  10.       trace("true");
  11.       _root.userIndex += 1;
  12.       _root.index += 1;
  13.       _root.score = _root.count * _root.count;
  14.    }
  15.    else
  16.    {
  17.       gotoAndStop(30);
  18.    }
  19.    trace(_root.userIndex);
  20.    trace(_root.count);
  21.    if(_root.userIndex < _root.count)
  22.    {
  23.       trace("out");
  24.    }
  25.    else
  26.    {
  27.       _root.p = 1;
  28.       _root.index = 1;
  29.       _root.userIndex = 0;
  30.       gotoAndPlay(15);
  31.    }
  32. }
  33.